<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\Expert\Expert;
use common\models\Expert\ExpertSearch;
use \kucha\ueditor\UEditor;
/* @var $this yii\web\View */
/* @var $model common\models\Invitation\Invitation */
/* @var $form yii\widgets\ActiveForm */

$zhuanjia = ArrayHelper::map(Expert::find()->all(), 'id', 'username');
$youxiang = ArrayHelper::map(Expert::find()->all(), 'id', 'email');
?>

<div class="invitation-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'eid')->dropdownlist($zhuanjia) ?>

    <?= $form->field($model, 'email')->dropdownlist($youxiang) ?>

    <?= $form->field($model, 'xinxi')->widget('kucha\ueditor\UEditor',[]) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', '发送') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
